<script>
// import routerInterceptor from "./utils/router-interceptor.js";
import usePrivacyStore from "@/store/privacy.js";

const listenPrivacyOpen = () => {
	const privacyStore = usePrivacyStore();
	uni.onNeedPrivacyAuthorization && uni.onNeedPrivacyAuthorization((resolve, eventInfo) => {
		console.log("resolve", resolve)
		console.log("eventInfo", eventInfo)
		privacyStore.privacyModal.resolvePrivacyAuthorization = resolve;
		privacyStore.togglePrivacyModal(true);
	})
};

export default {

	onUnload: function () {
		// uni.setInnerAudioOption({
		// 	obeyMuteSwitch: true // 仅在ios生效 是否遵循静音开关， 设置为false即使在静音模式下也能播放音声
		// });
	},
	onLaunch: function () {
		// routerInterceptor();
		listenPrivacyOpen();
		console.log('App Launch')
		// uni.setInnerAudioOption({
		// 	obeyMuteSwitch: false // 仅在ios生效 是否遵循静音开关， 设置为false即使在静音模式下也能播放音声
		// });
	},
	onShow: function () {
		console.log('App Show')
	},
	onHide: function () {
		console.log('App Hide')
	}
}
</script>

<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uview-plus/index.scss';
@import '@/static/css/reset.css';
@font-face {
	font-family: 'DINE';
	src: url('https://resource.gzhaochuan.com:30091/ai-card/static/D-DINExp.ttf') format('truetype');
}

@font-face {
	font-family: 'kuaikanshijie';
	src: url('https://resource.gzhaochuan.com:30091/ai-card/static/kuaikanshijieti20231213.otf') format('truetype');
}

@font-face {
	font-family: 'MiSans';
	src: url('https://resource.gzhaochuan.com:30091/ai-card/static/MiSans-Regular.ttf') format('truetype');
}
</style>
